package priv.winnine.entity.vo;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import priv.winnine.entity.bo.InvalidParamDesc;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Getter
@Setter
public class TestEntity extends Request {

    @NotBlank(message = InvalidParamDesc.NOT_NULL)
    @Length(max = 32, message = InvalidParamDesc.MAX_LENGTH_32)
    public String getAppID() {
        return getStringFromInfo("appID");
    }

    @Length(max = 10, message = InvalidParamDesc.MAX_LENGTH_10)
    public String getAccount() {
        return getStringFromSubject("account");
    }

    public Integer getTest() {
        return getIntFromSubject("test");
    }

    @NotNull(message = InvalidParamDesc.NOT_NULL)
    public Boolean getTest1() {
        return getBooleanFromSubject("test1");
    }

}
